import React, { Component } from 'react'
import { Tabs } from 'antd'
import Key from './Key'
import Value from './Value'
const { TabPane } = Tabs
export default class componentName extends Component {
  constructor(props) {
    super(props)
    this.state = {
      activeKey: 'k1',
      keyName: '',
    }
  }

  changeActiveKey = (activeKey, keyName) => {
    this.setState({ activeKey, keyName: keyName || '' })
  }
  render() {
    return (
      <Tabs activeKey={this.state.activeKey} onChange={this.changeActiveKey}>
        <TabPane tab="key值管理" key="k1">
          <Key changeActiveKey={this.changeActiveKey} />
        </TabPane>
        <TabPane tab="value值管理" key="k2">
          <Value keyName={this.state.keyName} />
        </TabPane>
      </Tabs>
    )
  }
}
